<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
  <div class="navbar navbar-default navbar-fixed-top">
    <div class="container">
      <div class="navbar-header">
        <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
        </button>
        <a class="navbar-brand" href="index.jsp">首页</a>
      </div>
      <div class="collapse navbar-collapse">
        <ul class="nav navbar-nav">
          
          <c:choose>
          	<c:when test="${empty sessionScope.loginUser }">
          		<li><a href="register.html">注册</a></li>
          		<li><a href="login.html">登录</a></li>
          		<li><a href="doc/index.html"><span class="label label-danger">项目API文档</span></a></li>
          	</c:when>
          	<c:otherwise>
          	    <li class="active"><a href="home.jsp">用户主页</a></li>
          		<li><a href="account_details.jsp">个人信息</a></li>
          		<c:if test="${sessionScope.loginUser.userName eq 'admin' }">
          		<li><a href="userList.view">用户列表</a></li>
          		</c:if>
          		<li><a href="doc/index.html"><span class="label label-danger">项目API文档</span></a></li>
          		<li><a href="logout.jsp">退出</a></li>
          	</c:otherwise>
          </c:choose>
          		
        </ul>
      </div><!--/.nav-collapse -->
    </div>
  </div>
    